<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>腐蚀专题列表</title>
    <link rel="stylesheet" type="text/css" href="/static/index/css/style.css">
</head>

<body>
    <div class="wrap">
        <div class="sidebar">
            <header>
                <div class="logo">
                    <a href="/index" title=""> </a>
                </div>
                <div class="clearFloat"> </div>
            </header>
            <div class="widget">
                <div class="latestN">
                    <a href="/index"><span class="float-lt">最新专题</span>
                    <em class="float-rt">&gt;&gt;</em></a>
                </div>
                {foreach $categoryTree as $key=>$value}
                <div class="links">
                    <div class="links_t">
                        <h3>{$value.name}</h3> 
                    </div>
                    <ul>
                        {notempty name="value.child"}
                        {foreach $value.child as $val}
                        <li>
                            <a href="/index/{$val.id}">{$val.name}</a>
                        </li>
                        {/foreach}
                        {/notempty}
                    </ul>
                </div>
                {/foreach}
            </div>
            <div class="clearFloat"></div>
        </div>
        <div class="content" style="padding-bottom:40px;">
            <div class="txt-center margin-top-18">
                <div class="bannerbox"><img src="/static/index/images/logo_banner.png"></div>
            </div>
            <div class="contenCon">
                {notpresent  name="listTopic"}
                <div class="listCon">
                    <div class="part">
                        <h2>最新专题</h2>
                        {foreach lastTopic as $val } 
                        <div class="grid">
                            <div class="preview">
                                <a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" title="{$val.title}" target="_blank"><img src="{$val.title_pic}" alt="{$val.title}"></a>
                            </div>
                            <div class="data">
                                <h3><a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" target="_blank">
                                    {$val.title}
                                    </a></h3>
                                <p class="category">
                                    {$val.summary|mb_substr=0,100}
                                </p>
                            </div>
                        </div>
                        {/foreach}
                        <div class="clearFloat"></div>
                    </div>
                    <div class="part" style="padding-bottom:20px;">
                        <h2>推荐专题</h2>
                        {foreach topTopic as $val } 
                        <div class="grid">
                            <div class="preview">
                                <a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" title="{$val.title}" target="_blank"><img src="{$val.title_pic}" alt="{$val.title}"></a>
                            </div>
                            <div class="data">
                                <h3><a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" target="_blank">
                                    {$val.title}
                                    </a></h3>
                                <p class="category">
                                    {$val.summary|mb_substr=0,100}
                                </p>
                            </div>
                        </div>
                        {/foreach}
                        <div class="clearFloat"></div>
                    </div>
                </div>
                {else /}
                <div class="listCon">
                    <div class="part">
                        <h3 class="tit"><span>{$category.name}</span></h3>
                        {foreach listTopic as $val} 
                        {php}//var_dump($val);{/php}
                        <div class="grid">
                            <div class="preview">
                                <a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" title="{$val.title}" target="_blank"><img src="{$val.title_pic}" alt="{$val.title}"></a>
                            </div>
                            <div class="data">
                                <h3><a href="{$val.topic_url ?: '/topic/'.$val['id'].'.html'}" target="_blank">
                                    {$val.title}
                                    </a></h3>
                                <p class="category">
                                    {$val.summary|mb_substr=0,100}
                                </p>
                            </div>
                        </div>
                        {/foreach}
                        <div class="clearFloat"></div>
                    </div>
                </div>
                {/notpresent}
            </div>
        </div>
    </div>
    <div class="clearFloat"></div>
</body>

</html>